package com.example.tests;

import org.testng.annotations.Test;

public class ContactCreationTests extends TestBase {
<<<<<<< HEAD
	
	@Test
	public void nonEmptyContactCreation() throws Exception {
		app.getNavigationHelper().openMainPage();
		app.getContactHelper().initNewContact();
		ContactData contact = new ContactData();
		contact.firstName = "Ivan";
		contact.secondName = "Ivanov";
		contact.address = "Saint Petersburg";
		contact.homePhone = "44444444";
		contact.mobilePhone = "77777777";
		contact.email = "lazy@field.com";
		contact.email2 = "field@lazy.com";
		contact.day = "13";
		contact.month = "May";
		contact.year = "1990";
		contact.newgroup = "group name 1";
		contact.address2 = "Moskow";
		contact.phone2 = "88888888";		
		app.getContactHelper().fillContactForm(contact);
		app.getContactHelper().submitContactCreation();
		app.getNavigationHelper().returnToMainPage();
	}
	
	@Test
	public void emptyContactCreation() throws Exception {
		app.getNavigationHelper().openMainPage();
		app.getContactHelper().initNewContact();
		ContactData contact = new ContactData();
		contact.firstName = "";
		contact.secondName = "";
		contact.address = "";
		contact.homePhone = "";
		contact.mobilePhone = "";
		contact.email = "";
		contact.email2 = "";
		contact.day = "-";
		contact.month = "-";
		contact.year = "";
		contact.newgroup = "[none]";
		contact.address2 = "";
		contact.phone2 = "";
		app.getContactHelper().fillContactForm(contact);
		app.getContactHelper().submitContactCreation();
		app.getNavigationHelper().returnToMainPage();

	}
}
